package com.jp.knowledge.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by jiayen on 16/9/29.
 */
public class InfoData  implements Parcelable{


    /**
     * id : 592b77c4a96d6587b913670e6056236b
     * html : </>
     * url : http://******
     * isFollow : 1
     * type : 1
     * topicInfo : {"topicId":"592b77c4a96d6587b913670e6056236b","userName":"巫海清","portrait":"http://www.jp580.com/1.jpg","tags":["体验","界面","功能","运营","思路"],"count":111}
     */

    private String id;
    private String html;
    private String url;
    private int isFollow;
    private int type;
    private String title;
    private String infoPic;
    private String baiduCode;
    private String qiniuUrl;
    private String host;
    private String token;
    private String format;
    private int pageCout;
    private int pageCount;
    private double fileSize;

    private String navType;
    private String subType;
    private String authorIcon;
    private String authorName;
    private int commentCount;

    private int viewPermit;
    private String viewPrompt;
    private long viewCount;
    private String shareUrl;
    private int packageid;
    private int integral;
    private String notice;
    private String source;
    private int infoOriginal;
    private int state;
    private List<AppListBean> appList;

    private String downloadUrl;
    private String fileUrl;

    private int width;
    private int height;

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public double getFileSize() {
        return fileSize;
    }

    public void setFileSize(double fileSize) {
        this.fileSize = fileSize;
    }

    public String getDownloadUrl() {
        return downloadUrl;
    }

    public void setDownloadUrl(String downloadUrl) {
        this.downloadUrl = downloadUrl;
    }

    public String getFileUrl() {
        return fileUrl;
    }

    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl;
    }

    public List<AppListBean> getAppList() {
        return appList;
    }

    public void setAppList(List<AppListBean> appList) {
        this.appList = appList;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getNavType() {
        return navType;
    }

    public void setNavType(String navType) {
        this.navType = navType;
    }

    public String getSubType() {
        return subType;
    }

    public void setSubType(String subType) {
        this.subType = subType;
    }

    public String getAuthorIcon() {
        return authorIcon;
    }

    public void setAuthorIcon(String authorIcon) {
        this.authorIcon = authorIcon;
    }

    public String getAuthorName() {
        return authorName;
    }

    public void setAuthorName(String authorName) {
        this.authorName = authorName;
    }

    public int getPageCount() {
        return pageCount;
    }

    public void setPageCount(int pageCount) {
        this.pageCount = pageCount;
    }

    public int getPageCout() {
        return pageCout;
    }

    public void setPageCout(int pageCout) {
        this.pageCout = pageCout;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    /**
     * topicId : 592b77c4a96d6587b913670e6056236b
     * userName : 巫海清
     * portrait : http://www.jp580.com/1.jpg
     * tags : ["体验","界面","功能","运营","思路"]
     * count : 111
     */

    private TopicInfo topicInfo;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getHtml() {
        return html;
    }

    public void setHtml(String html) {
        this.html = html;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public int getIsFollow() {
        return isFollow;
    }

    public void setIsFollow(int isFollow) {
        this.isFollow = isFollow;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public TopicInfo getTopicInfo() {
        return topicInfo;
    }

    public void setTopicInfo(TopicInfo topicInfo) {
        this.topicInfo = topicInfo;
    }


    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getInfoPic() {
        return infoPic;
    }

    public void setInfoPic(String infoPic) {
        this.infoPic = infoPic;
    }

    public int getCommentCount() {
        return commentCount;
    }

    public void setCommentCount(int commentCount) {
        this.commentCount = commentCount;
    }

    public InfoData() {
    }

    public String getBaiduCode() {
        return baiduCode;
    }

    public void setBaiduCode(String baiduCode) {
        this.baiduCode = baiduCode;
    }

    public String getQiniuUrl() {
        return qiniuUrl;
    }

    public void setQiniuUrl(String qiniuUrl) {
        this.qiniuUrl = qiniuUrl;
    }

    public String getFormat() {
        return format;
    }

    public void setFormat(String format) {
        this.format = format;
    }

    public int getViewPermit() {
        return viewPermit;
    }

    public void setViewPermit(int viewPermit) {
        this.viewPermit = viewPermit;
    }

    public String getViewPrompt() {
        return viewPrompt;
    }

    public void setViewPrompt(String viewPrompt) {
        this.viewPrompt = viewPrompt;
    }

    public long getViewCount() {
        return viewCount;
    }

    public void setViewCount(long viewCount) {
        this.viewCount = viewCount;
    }

    public String getShareUrl() {
        return shareUrl;
    }

    public void setShareUrl(String shareUrl) {
        this.shareUrl = shareUrl;
    }

    public int getPackageid() {
        return packageid;
    }

    public void setPackageid(int packageid) {
        this.packageid = packageid;
    }

    public int getIntegral() {
        return integral;
    }

    public void setIntegral(int integral) {
        this.integral = integral;
    }

    public String getNotice() {
        return notice;
    }

    public void setNotice(String notice) {
        this.notice = notice;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public int getInfoOriginal() {
        return infoOriginal;
    }

    public void setInfoOriginal(int infoOriginal) {
        this.infoOriginal = infoOriginal;
    }

    public static class AppListBean{

        /**
         * appIcon : http://pic.jp580.com/library/product/details/info/mobileiphone170320.png
         * appName : Iphone下载
         * appId : 1189171735
         * appUrl : https://itunes.apple.com/cn/app/id1189171735?mt=8
         */

        private String appIcon;
        private String appName;
        private String appId;
        private String appUrl;

        public String getAppIcon() {
            return appIcon;
        }

        public void setAppIcon(String appIcon) {
            this.appIcon = appIcon;
        }

        public String getAppName() {
            return appName;
        }

        public void setAppName(String appName) {
            this.appName = appName;
        }

        public String getAppId() {
            return appId;
        }

        public void setAppId(String appId) {
            this.appId = appId;
        }

        public String getAppUrl() {
            return appUrl;
        }

        public void setAppUrl(String appUrl) {
            this.appUrl = appUrl;
        }
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.html);
        dest.writeString(this.url);
        dest.writeInt(this.isFollow);
        dest.writeInt(this.type);
        dest.writeString(this.title);
        dest.writeString(this.infoPic);
        dest.writeString(this.baiduCode);
        dest.writeString(this.qiniuUrl);
        dest.writeString(this.host);
        dest.writeString(this.token);
        dest.writeString(this.format);
        dest.writeParcelable(this.topicInfo, flags);
    }

    protected InfoData(Parcel in) {
        this.id = in.readString();
        this.html = in.readString();
        this.url = in.readString();
        this.isFollow = in.readInt();
        this.type = in.readInt();
        this.title = in.readString();
        this.infoPic = in.readString();
        this.baiduCode = in.readString();
        this.qiniuUrl = in.readString();
        this.host = in.readString();
        this.token = in.readString();
        this.format = in.readString();
        this.topicInfo = in.readParcelable(TopicInfo.class.getClassLoader());
    }

    public static final Creator<InfoData> CREATOR = new Creator<InfoData>() {
        @Override
        public InfoData createFromParcel(Parcel source) {
            return new InfoData(source);
        }

        @Override
        public InfoData[] newArray(int size) {
            return new InfoData[size];
        }
    };
}
